package com.neegix.development.api.application.assembler;

import com.neegix.development.api.application.service.command.CreateApiCommand;
import com.neegix.development.api.application.service.command.UpdateApiCommand;
import com.neegix.development.api.domain.entity.Api;
import com.neegix.development.api.infrastructure.repository.dataobject.ApiDO;
import com.neegix.development.api.interfaces.vo.ApiListVO;
import com.neegix.development.api.interfaces.vo.ApiVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
  * This file is auto-generated by nebula-framework-generator.
  * The auto-generation plugin was developed using IntelliJ IDEA Community Edition.
  * Thanks to JetBrains for their outstanding contributions to the developer community.
  * <p>
  * The code generated by this tool is owned by the user of the tool.
  * The tool itself is copyrighted by <a href="https://www.neegix.com">https://www.neegix.com</a>.
  *
  * @author <a href="https://www.neegix.com">https://www.neegix.com</a>
  * @version 1.0.0
  * @since 2024-11-22 11:43:14
  */

@Mapper
public interface ApiAssembler {
    ApiAssembler INSTANCE = Mappers.getMapper(ApiAssembler.class);

    @Mapping(target = "module", ignore = true)
    Api covertToApiEntity(CreateApiCommand createApiCommand);

    @Mapping(target = "module", ignore = true)
    Api covertToApiEntity(UpdateApiCommand updateApiCommand);

    ApiVO covertVO(Api api);

    List<ApiListVO> convertToListVO(List<ApiDO> apiDOS);
}